﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

using Bricks.Component.Utils;
using Bricks.Site.Models;
using Bricks.Business.Models.ScheduleManagement;


namespace Bricks.Business.Service
{
    public interface ITotalMaintenanceService
    {
        IQueryable<TotalMaintenance> TotalMaintenances { get; }

        #region 主界面加载
        List<TotalMaintenanceView> GetTotalReviseList(Guid projectID, string contractType, Guid contractID);

        List<TotalMaintenanceDetailsView> GetTotalMaintenanceDetailList(Guid projectID, string contractType, Guid contractID);

        List<TotalMaintenanceDetailsView> GetTotalReviseDetailList(Guid projectID, string contractType, Guid totalReviseID);

        List<TotalMaintenanceDetailsView> GetTotalReviseDetailListForPreview(Guid projectID, string contractType, List<Guid> lstContractID);
        #endregion

        #region 单据操作
        OperationResult Delete(Guid projectID, string contractType, Guid contractID);

        OperationResult Revise(Guid projectID, string contractType, Guid contractID, Guid totalReviseID);

        TotalMaintenanceView GetTotalMaintenanceByID(Guid id);

        void SaveTotalMaintenance(TotalMaintenanceView totalMaintenanceView, List<TotalMaintenanceDetailsView> saveList, bool isUpdateDetails = true);

        void AddReviseData(Guid totalMaintenanceID);
        #endregion
    }
}